<template>
	<view class="container">

		<view :class="tabtarIndex==0?'page':''" v-show="tabtarIndex==0">
			<DriverTask></DriverTask>
		</view>
		<view :class="tabtarIndex==1?'page':''" v-show="tabtarIndex==1">
			<DriverMy></DriverMy>
		</view>

		<tui-tabbar :current="tabtarIndex" @click="tabbarSwitch" backdropFilter :backgroundColor="backgroundColor"
			:tabBar="tabBar" color="#666" selectedColor="#2FCC71"></tui-tabbar>
	</view>
</template>

<script>
	import DriverTask from "@/pages/driver/driverTask/index";
	import DriverMy from "@/pages/driver/driverMy/index";

	export default {
		data() {
			return {
				tabtarIndex: 0,
				tabBar: [{
						// pagePath: '/pages/driver/driverTask/index',
						text: '任务',
						iconPath: '/static/img/icon_task.png',
						selectedIconPath: '/static/img/icon_task_s.png',
						// num: 1,
						// isDot: false
					},
					{
						// pagePath: '/pages/driver/driverHelper/index',
						text: '我的',
						iconPath: '/static/img/icon_my.png',
						selectedIconPath: '/static/img/icon_my_s.png',
						// num: 2,
						// isDot: true
					}
				],
			}
		},
		components: {
			DriverTask,
			DriverMy
		},
		methods: {
			tabbarSwitch(e) {

				this.tabtarIndex = e.index;

			}
		}
	}
</script>

<style>
	.container {
		position: relative;
		padding-bottom: 100rpx;
	}
</style>
